package com.nuoniu.sibanyun.mapper.work;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.work.WorkPlanContent;
import com.nuoniu.sibanyun.entity.work.WorkPlanSummary;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 计划内容 Mapper 接口
 * </p>
 *
 * @author baiqiang
 * @since 2020-08-29
 */
public interface WorkPlanContentMapper extends BaseMapper<WorkPlanContent> {

    @Select("select *, id as 'key' from oa_workplan_content where plan_id = #{planId}")
    List<WorkPlanContent> getPlanContentList(Long planId);

    @Delete("delete from oa_workplan_content where plan_id = #{planId}")
    void deleteByPlanId(Long planId);

    @Update("update oa_workplan_content set status=#{status} where id=#{id}")
    void updateStatus(WorkPlanContent content);
}
